<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="path" value="${pageContext.request.contextPath }"/>
<html>
    <head>
        <meta charset="utf-8">
        <title>
            影院添加
        </title>
        <meta name="renderer" content="webkit">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="format-detection" content="telephone=no">
        <link rel="stylesheet" href="./css/font.css">
        <link rel="stylesheet" href="./css/index.css">
        <script src="./lib/layui/layui.js" charset="utf-8"></script>
        <script type="text/javascript" src="./js/index.js"></script>
        <script src="js/jquery.js"></script>
        <STYLE>
            #addImg{
                border: 1px;
                width: 150px;
                height: 50px;
                position: relative;
                left: 60px;
                top: 30px;
                color: #5b5b5b;
                background-color: #e6e6e6;
                border-radius: 10px;
            }
        </STYLE>
    </head>
    <body>

        <div class="layui-card">
            <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">

              <div class="layui-tab-content" >
                <div class="layui-tab-item layui-show">
                    <form class="layui-form layui-form-pane" method="post" enctype="multipart/form-data" action="${path}/CinemaServlet?prom=cinCount">
                        <div class="layui-form-item">
                            <label class="layui-form-label" style="height: 100px;padding: 0px">
                                <img id="moviePirture" src="${path}/images/cinemaPicture/tjtb.jpg" width="110px" height="110px">
                            </label>
                            <div class="layui-input-block" style="height: 100px">
                                <input type="button" style="z-index: 1" value="添加图片" id="addImg">
                                <input id="file" type="file" name="cinema_img" autocomplete="off" placeholder=" "
                                       class="layui-input" lay-verify="required" style="height: 80px;width: 250px;position: relative; bottom: 40px;z-index: 2;opacity: 0">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">
                                <span class='x-red'>*</span>影院名称
                            </label>
                            <div class="layui-input-block">
                                <input type="text" name="cinema_name" autocomplete="off" placeholder="" id="cinema_name"
                                class="layui-input" lay-verify="required">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">
                                <span class='x-red'>*</span>影院地址
                            </label>
                            <div class="layui-input-block">
                                <input type="text" name="cinema_address" autocomplete="off" placeholder="" id="cinema_address"
                                class="layui-input" lay-verify="number">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">
                                <span class='x-red'>*</span>影院号码
                            </label>
                            <div class="layui-input-block">
                                <input type="text" name="cinema_phone" autocomplete="off" placeholder="" id="cinema_phone"
                                       class="layui-input" lay-verify="number">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">
                                <span class='x-red'>*</span>影院评分
                            </label>
                            <div class="layui-input-block">
                                <input type="text" name="cinema_score" autocomplete="off" placeholder="" id="cinema_score"
                                       class="layui-input" lay-verify="number">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <button class="layui-btn" lay-submit="" lay-filter="*" type="submit" style="position: absolute;left: 330px">
                                保存
                            </button>
                        </div>
                    </form>
                    <div style="height:100px;"></div>
                </div>

              </div>
            </div> 
        </div>
    <script>
        $("#file").change(function(){
            var url=document.getElementById('file').files[0].name;
            $("#moviePirture").attr("src","${path}/images/cinemaPicture/"+url);
            //获取文件全部路径
            var urlPath=document.getElementById('file').value;
        })
    </script>
    </body>
</html>